package com.lagou.edu.ioc;

import java.util.List;
import java.util.Objects;

/**
 * @author Kirito
 * @description:
 * @date 2020/04/04
 */
public class BeanDefinition {

    private String id;

    private Class clazz;

    private List<Class<?>> interfaces;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Class getClazz() {
        return clazz;
    }

    public void setClazz(Class clazz) {
        this.clazz = clazz;
    }

    public List<Class<?>> getInterfaces() {
        return interfaces;
    }

    public void setInterfaces(List<Class<?>> interfaces) {
        this.interfaces = interfaces;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BeanDefinition that = (BeanDefinition) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(clazz, that.clazz) &&
                Objects.equals(interfaces, that.interfaces);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, clazz, interfaces);
    }
}
